Due to the remarkable development of the information and communication technology and the semiconductor technology, the spread and the use of portable electronic device has been rapidly increased. Recent electronic device has been developed into a mobile convergence device which does not stay in its own traditional area but covers other device area. Further, electronic device has been developed into various forms such as a wearable device that can be worn on user body, e.g., a device that can be worn on the wrist or a device in the form of glasses, as well as a device possessed by user such as a tablet computer, and a smart phone. The electronic device has been developed to have a high computing power compared to the related art, and may download application provided by various companies as well as application provided by the manufacturer of the portable electronic device to provide to the user. Accordingly, the electronic device may provide various services such as the mobile payment/stock transaction/Internet banking, web browsing, social network service (SNS), games, calendar, location-based service, or the like, through application. Electronic devices may provide various services including various security functions such as a password or a pattern code to the user in an environment in which security is maintained.